<?php

class Default_ErrorController extends Zend_Controller_Action 
{    
	public function preDispatch(){
		$this->tplDirectory = "default/error/";
	}
	
	public function errorAction()
    {	
		 
		  
		switch ($this->_error->type) {  
            case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER: 
				$this->view->message = 'HTTP 400, The requested URL was not found.';  
                break;  	
            case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:  
                
                $this->view->message = 'HTTP 400, The requested URL was not found.';  
                break;  
  
            default:  
                $this->getResponse()->setHttpResponseCode(400);  
                 
				$this->view->message = 'The requested URL was not found.'; 
                break;  
        } 
		 	
		echo Cff::renderTpl($this->tplDirectory."error.tpl","layout");	
    }
	
	 
}